<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-on指令</title>
</head>
<body>
    <div id="app">
        {{count}}
        <!-- 这种内联格式的事件逻辑不用加 this.count  -->
        <button v-on:click="count = count - 1">-</button>
        <button v-on:mouseenter="count = count + 1">+</button>
    </div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
<script>
    const app = new Vue({
        el:'#app',
        data:{
            count:0
        }
    })
</script>
</html>